/*
 *@Description: 书名模型
 *@Author:  lupan
 *@Date: 2019-06-19 09:22:10
*/

const mongoose = require('mongoose')
const Schema = mongoose.Schema;

const BookInfoSchema = new Schema({
  title: { // 小说名称
    type: String,
    require: true
  },
  author: { // 小说作者
    type: String,
    require: true
  },
  menuCode: { // 小说分类
    type: String,
    require: true
  },
  info: { // 小说简介
    type: String
  },
  cover: { // 小说封面
    type: String
  },
  source: { // 爬取来源
    type: String
  },
  createDate: {
    type: Date,
    default: Date.now
  }
})

module.exports = mongoose.model('BookInfo', BookInfoSchema, 'bookInfo')